    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// 根据用户Id删除用户
export const deleteUser = (userId:any) => {
    return service({
        url: '/auth/index/deleteUser/' + userId,
        method: 'post'
    })
};


// 登录
export const login = (data:any) => {
    return service({
        url: '/auth/index/login',
        method: 'post',
        data
    })
};

// 获取树型 菜单
export const getMenuTree = () => {
    return service({
        url: '/auth/index/getMenuTree',
        method: 'post',
        
    })
};

// 获取商户列表
export const getUserList = (data:any) => {
    return service({
        url: '/auth/index/getUserList',
        method: 'post',
        data
    })
};
// 修改商户
export const  amendUser = (data:any) => {
    return service({
        url: '/auth/index/amendUser',
        method: 'post',
        data
    })
};
// 批量删除
export const  deleteUserAll = (data:any) => {
    return service({
        url: '/auth/index/deleteUserAll',
        method: 'post',
        data
    })
};
// 商户审核
export const  checkUser = (data:any) => {
    return service({
        url: '/auth/index/checkUser',
        method: 'post',
        data
    })
};
// 品牌列表
export const  getBrandList = (data:any) => {
    return service({
        url: '/shop/index/getBrandList',
        method: 'post',
        data
    })
};
// 添加品牌
export const  addBrand = (data:any) => {
    return service({
        url: '/shop/index/addBrand',
        method: 'post',
        data
    })
};
// 修改品牌状态
export const  UpdateBrandStatus = (data:any) => {
    return service({
        url: '/shop/index/UpdateBrandStatus',
        method: 'post',
        data
    })
};

// 获取商品类型树
export const  getTypeTree = () => {
    return service({
        url: '/shop/type',
        method: 'get',
       
    })
};

// 修改类型状态
export const setTypeStatus = (typeId:any,typeStatus:any) => {
    return service({
        url: '/shop/type/setTypeStatus/' + typeId+'/'+typeStatus,
        method: 'post'
    })
};

// 删除分类
export const deleteTypeById = (typeId:any) => {
    return service({
        url: '/shop/type/deleteTypeById/' + typeId,
        method: 'post'
    })
};
// 添加类型
export const  addType = (data:any) => {
    return service({
        url: '/shop/type',
        method: 'post',
        data
    })
};
// 添加子类型
export const  addChildrenType = (data:any) => {
    return service({
        url: '/shop/type/addChildrenType',
        method: 'post',
        data
    })
};
// 修改类型
export const  updateType = (data:any) => {
    return service({
        url: '/shop/type/updateType',
        method: 'post',
        data
    })
};
// 获取商品列表
export const  getProdList = (data:any) => {
    return service({
        url: '/shop/prod/getProdList',
        method: 'post',
        data
    })
};
// 添加商品
export const  addProd = (data:any) => {
    return service({
        url: '/shop/prod/addProd',
        method: 'post',
        data
    })
};

// 获取商品类型树
export const  getTypeSelectTree = () => {
    return service({
        url: '/shop/type/getTypeSelectTreeList',
        method: 'post',
        
    })
};
// 获取商品所有品牌
export const  getBrandListAll = () => {
    return service({
        url: '/shop/brand/getBrandListAll',
        method: 'post',
        
    })
};
// 获取商品所有标签
export const  getTagList = () => {
    return service({
        url: '/shop/tag/getTagList',
        method: 'post',
        
    })
};
// 获取商品所有单位
export const  getUnitList = () => {
    return service({
        url: '/shop/unit/getUnitList',
        method: 'post',
        
    })
};
// 获取供应商
export const  getApprList = () => {
    return service({
        url: '/shop/addr/getApprList',
        method: 'post',
        
    })
};

// 批量删除商品
export const  deleteAllProd = (data:any) => {
    return service({
        url: '/shop/prod/deleteAllProd',
        method: 'post',
        data
    })
};